<%@ Page SmartNavigation="False" Language="C#"  enableViewState = "false" %>
<%@ Register TagPrefix="Ultimate"  tagName="PlayerPanel" src="~/RegistrationSystem/Controls/PlayerPanel.ascx"%>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Register TagPrefix="CSD" Namespace="CommunityServer.Discussions.Controls" Assembly="CommunityServer.Discussions" %>
<%@ Import Namespace="CommunityServer.Discussions.Components" %>
<%@ Import Namespace="CommunityServer.Components" %>

<script runat="server">
	int i = 1;
</script>

<CS:MPContainer runat="server" id="MPContainer" ThemeMasterFile="ForumMaster.ascx" >
    <CS:MPContent id="bcr" runat="server">
		<CSD:ForumGroupView runat="server" id="Forumgroupview1" />
	</CS:MPContent>
	
	<CS:MPContent id="rcr" runat="server" >
		<div class="CommonSidebar">
		    <div style="display:none;">
		        <CS:ContentPart runat = "Server" contentname="communitymenu" id = "featuredContentPart" text="&lt;div class=&quot;CommonSidebarArea&quot;&gt;&lt;h4 class=&quot;CommonSidebarHeader&quot;&gt;Featured Item&lt;/h4&gt;&lt;div class=&quot;CommonSidebarContent&quot;&gt;Content Management is easy in Community Server! &lt;p&gt;Sign-in with your Admin account and double-click to edit me!&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;" />
		    </div>
            <Ultimate:PlayerPanel runat="server" ID="PlayerPanel1" />
            
			<div class="CommonSidebarArea">
				<h4 class="CommonSidebarHeader"><CS:ResourceLabel runat="server" ResourceName="Shortcuts" id="Resourcelabel7"/></h4>
				<div class="CommonSidebarContent">
					<CSD:ForumLinkBar runat="Server" ID="Forumlinkbar1"/>							
				</div>
			</div>
			
			<div class="CommonSidebarArea">
				<h4 class="CommonSidebarHeader">
					<cs:ResourceControl ResourceName="PopularTags" runat="server" ID="Resourcecontrol1" NAME="Resourcecontrol1"/>
				</h4>
				<div class="CommonSidebarContent">
					<CS:TagCloud ApplicationType="forum" TagCloudCssClasses="CommonTag6,CommonTag5,CommonTag4,CommonTag3,CommonTag2,CommonTag1" runat="server" id="TagCloud" MaximumNumberOfTags="25" ShowTagCounts="false" IgnoreFilterTags="true" CssClass="CommonSidebarTagCloud" />
				</div>
				<div class="CommonSidebarFooter">
					<a href="<%=SiteUrls.Instance().TagsHome %>"><cs:ResourceControl ResourceName="ViewAllTags" runat="server" ID="Resourcecontrol2" NAME="Resourcecontrol2"/></a>
				</div>
			</div>

			<csd:ThreadRepeater runat="server" ThreadViewMode="MyForums" id="Threadrepeater3">
				<HeaderTemplate>
				<div class="CommonSidebarArea">
					<h4 class="CommonSidebarHeader"><CSD:ForumAnchor class="lnk3" AnchorType="MenuMyForums" runat="server" ShowIcon = "false" ID="Forumanchor3"/></h4>
					<div class="CommonSidebarContent">
				</HeaderTemplate>
				<ItemTemplate>
						<div class="CommonSidebarContentItem">
							<a title="<%# ( ForumConfiguration.Instance().EnablePostPreviewPopup && CSContext.Current.User.Profile.EnablePostPreviewPopup  ? Formatter.CheckStringLength(Formatter.StripAllTags(DataBinder.Eval(Container.DataItem, "Body").ToString()), 300) : String.Empty )%>" 
									href="<%# Globals.GetSiteUrls().Post( (int) DataBinder.Eval(Container.DataItem, "PostID") ) %> "> 
									<%# Formatter.CheckStringLength(DataBinder.Eval(Container.DataItem, "Subject").ToString(), 22) %>
								</a>
						</div>
				</ItemTemplate>
				<FooterTemplate>
					</div>
				</div>
				</FooterTemplate>
			</csd:ThreadRepeater>

			<csd:ThreadRepeater runat="server" ThreadViewMode="Active" id="Threadrepeater1">
				<HeaderTemplate>
				<div class="CommonSidebarArea">
					<h4 class="CommonSidebarHeader"><CSD:ForumAnchor class="lnk3" AnchorType="PostsActive" runat="server" id="Forumanchor1" /></h4>
					<div class="CommonSidebarContent">
				</HeaderTemplate>
				<ItemTemplate>
						<div class="CommonSidebarContentItem">
							<a title="<%# ( ForumConfiguration.Instance().EnablePostPreviewPopup && CSContext.Current.User.Profile.EnablePostPreviewPopup  ? Formatter.CheckStringLength(Formatter.StripAllTags(DataBinder.Eval(Container.DataItem, "Body").ToString()), 300) : String.Empty )%>" 
									href="<%# Globals.GetSiteUrls().Post( (int) DataBinder.Eval(Container.DataItem, "PostID") ) %> "> 
									<%# Formatter.CheckStringLength(DataBinder.Eval(Container.DataItem, "Subject").ToString(), 22) %>
								</a>
						</div>
				</ItemTemplate>				
				<FooterTemplate>
					</div>
				</div>
				</FooterTemplate>
			</csd:ThreadRepeater>


			<csd:ThreadRepeater ThreadViewMode="Unanswered" runat="server" id="Threadrepeater2">
				<HeaderTemplate>
				<div class="CommonSidebarArea">
					<h4 class="CommonSidebarHeader"><CSD:ForumAnchor class="lnk3" AnchorType="PostsUnanswered" runat="server" id="Forumanchor2" /></h4>
					<div class="CommonSidebarContent">
				</HeaderTemplate>
				<ItemTemplate>
					<div class="CommonSidebarContentItem">
						<a title="<%# ( ForumConfiguration.Instance().EnablePostPreviewPopup && CSContext.Current.User.Profile.EnablePostPreviewPopup  ? Formatter.CheckStringLength(Formatter.StripAllTags(DataBinder.Eval(Container.DataItem, "Body").ToString()), 300) : String.Empty )%>" 
								href="<%# Globals.GetSiteUrls().Post( (int) DataBinder.Eval(Container.DataItem, "PostID") ) %> "> 
								<%# Formatter.CheckStringLength(DataBinder.Eval(Container.DataItem, "Subject").ToString(), 22) %>
							</a>
					</div>
				</ItemTemplate>				
				<FooterTemplate>
					</div>
				</div>
				</FooterTemplate>
			</csd:ThreadRepeater>

			<div class="CommonSidebarArea">
				<h4 class="CommonSidebarHeader">
					<CS:ResourceLabel runat="server" ResourceName="SearchView_Inline11" id="Resourcelabel5"/>
				</h4>
					<div class="CommonSidebarContent">
						<CS:SiteStats runat="server" ID="Sitestats1">
							<SkinTemplate>
								<asp:Repeater id="TopUsers" runat="server">
									<ItemTemplate>
										<div class="CommonSidebarContentItem">
											<%# (i++).ToString() %>)
											<a href="<%# Globals.GetSiteUrls().UserProfile( (string) DataBinder.Eval(Container.DataItem, "Username") ) %>">
												<%# DataBinder.Eval(Container.DataItem, "DisplayName") %>
											</a>
											(<a href="<%# Globals.GetSiteUrls().SearchByUser( (int) DataBinder.Eval(Container.DataItem, "UserID"), ApplicationType.Forum ) %>"><%# ((int)DataBinder.Eval(Container.DataItem, "TotalPosts")).ToString("n0") %></a>)
										</div>
									</ItemTemplate>
								</asp:Repeater>
							</SkinTemplate>
						</CS:SiteStats>			
					</div>
			</div>
		</div>
	</CS:MPContent>

</CS:MPContainer>